from fastapi import FastAPI

from recruit import adapter
from recruit.main.user_ioc import UserIOC
from recruit.presentation.user_interactor import UserInteractorFactory
from recruit.presentation.web import user


def create_app():
    app = FastAPI()
    adapter.init_dependencies(app)
    app.dependency_overrides.update(
        {
            UserInteractorFactory: UserIOC,
        }
    )
    app.include_router(user.router)
    return app
